From 079d90235d861ea98a396808b6b7097e129ce564 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 6 Nov 2014 09:17:34 -0800 Subject: [PATCH] Upgrade all deps to using build scripts --- .travis.install.deps.sh | 4 +- Cargo.lock | 93 ++++++++++++++++-------- Cargo.toml | 3 +- configure | 17 +++++ src/etc/dl-snapshot.py | 2 - src/etc/print-new-snapshot.py | 4 +- src/registry/Cargo.toml | 2 +- src/snapshots.txt | 16 ++++ tests/test_cargo_compile_custom_build.rs | 12 +-- 9 files changed, 108 insertions(+), 45 deletions(-) diff --git a/.travis.install.deps.sh b/.travis.install.deps.sh index f9eeb1522..c8396e394 100755 --- a/.travis.install.deps.sh +++ b/.travis.install.deps.sh @@ -3,10 +3,8 @@ set -x if [ "${TRAVIS_OS_NAME}" = "osx" ] || [ "${PLATFORM}" = "mac" ]; then target=apple-darwin elif [ "${OS}" = "Windows_NT" ] || [ "${PLATFORM}" = "win" ]; then - target=pc-mingw32 windows=1 -elif [ "${TRAVIS_OS_NAME}" = "linux" ] || [ "${PLATFORM}" = "linux" ] || - [ "${TRAVIS_OS_NAME}" = "" ]; then +else target=unknown-linux-gnu fi diff --git a/Cargo.lock b/Cargo.lock index 2ebe653e8..0ca879900 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,10 +2,10 @@ name = "cargo" version = "0.0.1-pre" dependencies = [ - "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle)", + "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=build-cmd)", "docopt 0.6.8 (git+https://github.com/docopt/docopt.rs)", "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs)", - "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs?ref=no-build-cmd)", + "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs)", "glob 0.0.1 (git+https://github.com/rust-lang/glob)", "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)", "registry 0.0.1-pre", @@ -18,18 +18,21 @@ dependencies = [ [[package]] name = "curl" version = "0.0.1" -source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#b595431adb3ff1ad55e3cff30ee8b0c05d9103a0" +source = "git+https://github.com/alexcrichton/curl-rust?ref=build-cmd#c7a6c5123c67abc22c3b3517579974782a9dd273" dependencies = [ - "curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle)", - "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config)", - "openssl-static-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-static-sys)", + "curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=build-cmd)", "url 0.1.0 (git+https://github.com/servo/rust-url)", ] [[package]] name = "curl-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#b595431adb3ff1ad55e3cff30ee8b0c05d9103a0" +source = "git+https://github.com/alexcrichton/curl-rust?ref=build-cmd#c7a6c5123c67abc22c3b3517579974782a9dd273" +dependencies = [ + "libz-sys 0.0.1 (git+https://github.com/alexcrichton/libz-sys)", + "openssl-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-sys)", + "pkg-config 0.0.1 (git+https://github.com/alexcrichton/pkg-config-rs)", +] [[package]] name = "docopt" @@ -39,7 +42,7 @@ source = "git+https://github.com/docopt/docopt.rs#0b184b15ed5ea7e3c180b088e8f99b [[package]] name = "encoding" version = "0.2.0" -source = "git+https://github.com/lifthrasiir/rust-encoding#841527086854d6958cd1008dabd2b69865c36267" +source = "git+https://github.com/lifthrasiir/rust-encoding#a06637cc6d0da37c12c68661e2ee9ca1999764a4" dependencies = [ "encoding-index-japanese 1.0.20140915 (git+https://github.com/lifthrasiir/rust-encoding)", "encoding-index-korean 1.0.20140915 (git+https://github.com/lifthrasiir/rust-encoding)", @@ -51,39 +54,47 @@ dependencies = [ [[package]] name = "encoding-index-japanese" version = "1.0.20140915" -source = "git+https://github.com/lifthrasiir/rust-encoding#841527086854d6958cd1008dabd2b69865c36267" +source = "git+https://github.com/lifthrasiir/rust-encoding#a06637cc6d0da37c12c68661e2ee9ca1999764a4" [[package]] name = "encoding-index-korean" version = "1.0.20140915" -source = "git+https://github.com/lifthrasiir/rust-encoding#841527086854d6958cd1008dabd2b69865c36267" +source = "git+https://github.com/lifthrasiir/rust-encoding#a06637cc6d0da37c12c68661e2ee9ca1999764a4" [[package]] name = "encoding-index-simpchinese" version = "1.0.20140915" -source = "git+https://github.com/lifthrasiir/rust-encoding#841527086854d6958cd1008dabd2b69865c36267" +source = "git+https://github.com/lifthrasiir/rust-encoding#a06637cc6d0da37c12c68661e2ee9ca1999764a4" [[package]] name = "encoding-index-singlebyte" version = "1.0.20140915" -source = "git+https://github.com/lifthrasiir/rust-encoding#841527086854d6958cd1008dabd2b69865c36267" +source = "git+https://github.com/lifthrasiir/rust-encoding#a06637cc6d0da37c12c68661e2ee9ca1999764a4" [[package]] name = "encoding-index-tradchinese" version = "1.0.20140915" -source = "git+https://github.com/lifthrasiir/rust-encoding#841527086854d6958cd1008dabd2b69865c36267" +source = "git+https://github.com/lifthrasiir/rust-encoding#a06637cc6d0da37c12c68661e2ee9ca1999764a4" [[package]] name = "flate2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/flate2-rs#31d9253355ba837cd62487b8766bf2be89f334a3" +source = "git+https://github.com/alexcrichton/flate2-rs#fc04214981c39633eb3859bd28389fc448d0e9fc" +dependencies = [ + "miniz-sys 0.0.1 (git+https://github.com/alexcrichton/flate2-rs)", +] + +[[package]] +name = "gcc" +version = "0.0.1" +source = "git+https://github.com/alexcrichton/gcc-rs#f23b4ba15348508b9ac557fc7eed2733f65bc1ee" [[package]] name = "git2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/git2-rs?ref=no-build-cmd#b7a84b817bc62df62e4449b7d78aa3887bd3b4c7" +source = "git+https://github.com/alexcrichton/git2-rs#847a4902f3e0971c394ac3f35995e49a774b275a" dependencies = [ - "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs?ref=no-build-cmd)", + "libgit2-sys 0.0.1 (git+https://github.com/alexcrichton/git2-rs)", "url 0.1.0 (git+https://github.com/servo/rust-url)", ] @@ -98,35 +109,59 @@ version = "0.1.0" source = "git+https://github.com/carllerche/hamcrest-rust.git#998036d000095f72c8bc86f2c412f6432f7ccc3b" [[package]] -name = "libgit2" +name = "libgit2-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/git2-rs?ref=no-build-cmd#b7a84b817bc62df62e4449b7d78aa3887bd3b4c7" +source = "git+https://github.com/alexcrichton/git2-rs#847a4902f3e0971c394ac3f35995e49a774b275a" dependencies = [ - "libssh2-static-sys 0.0.1 (git+https://github.com/alexcrichton/libssh2-static-sys)", - "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config)", - "openssl-static-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-static-sys)", + "libssh2-sys 0.0.1 (git+https://github.com/alexcrichton/ssh2-rs)", + "openssl-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-sys)", + "pkg-config 0.0.1 (git+https://github.com/alexcrichton/pkg-config-rs)", ] [[package]] -name = "libssh2-static-sys" +name = "libssh2-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/libssh2-static-sys#c0dc19bd7a9096b6c79911f4135cd4fb79962127" +source = "git+https://github.com/alexcrichton/ssh2-rs#27d760680cf7b756298c8cb61fabe3aaefe0e84a" +dependencies = [ + "libz-sys 0.0.1 (git+https://github.com/alexcrichton/libz-sys)", + "openssl-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-sys)", + "pkg-config 0.0.1 (git+https://github.com/alexcrichton/pkg-config-rs)", +] [[package]] -name = "link-config" +name = "libz-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/link-config#7c56ef12c8a49bedb0357e2a50af9ba79bf0ae1b" +source = "git+https://github.com/alexcrichton/libz-sys#37926b786b09e013e5fd64cc278b3df1b49c4fbe" +dependencies = [ + "pkg-config 0.0.1 (git+https://github.com/alexcrichton/pkg-config-rs)", +] + +[[package]] +name = "miniz-sys" +version = "0.0.1" +source = "git+https://github.com/alexcrichton/flate2-rs#fc04214981c39633eb3859bd28389fc448d0e9fc" +dependencies = [ + "gcc 0.0.1 (git+https://github.com/alexcrichton/gcc-rs)", +] + +[[package]] +name = "openssl-sys" +version = "0.0.1" +source = "git+https://github.com/alexcrichton/openssl-sys#d66fe8400ab3cbb79ed405e26ae19c0d0cc20931" +dependencies = [ + "pkg-config 0.0.1 (git+https://github.com/alexcrichton/pkg-config-rs)", +] [[package]] -name = "openssl-static-sys" +name = "pkg-config" version = "0.0.1" -source = "git+https://github.com/alexcrichton/openssl-static-sys#2e1c50a7f35ef52ce38dbd405a175b6dccc0ebad" +source = "git+https://github.com/alexcrichton/pkg-config-rs#d24a08d87d63df8dc9526c503944415b86719220" [[package]] name = "registry" version = "0.0.1-pre" dependencies = [ - "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle)", + "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=build-cmd)", ] [[package]] @@ -147,7 +182,7 @@ source = "git+https://github.com/alexcrichton/toml-rs#ac6f3b27e03e7a5938fd4cae5f [[package]] name = "url" version = "0.1.0" -source = "git+https://github.com/servo/rust-url#cec3c32168ce4233e179f22ef50215b3a9c34342" +source = "git+https://github.com/servo/rust-url#8a61b7654ab5378b488225a1d8a9cbbbcbd38894" dependencies = [ "encoding 0.2.0 (git+https://github.com/lifthrasiir/rust-encoding)", ] diff --git a/Cargo.toml b/Cargo.toml index cb1bddbe0..806cd9b4c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ git = "https://github.com/rust-lang/semver" [dependencies.curl] git = "https://github.com/alexcrichton/curl-rust" -branch = "bundle" +branch = "build-cmd" [dependencies.tar] git = "https://github.com/alexcrichton/tar-rs" @@ -35,7 +35,6 @@ git = "https://github.com/alexcrichton/flate2-rs" [dependencies.git2] git = "https://github.com/alexcrichton/git2-rs" -branch = "no-build-cmd" [dependencies.glob] git = "https://github.com/rust-lang/glob" diff --git a/configure b/configure index e825ba7e7..69080b53a 100755 --- a/configure +++ b/configure @@ -367,6 +367,23 @@ if [ "$CFG_SRC_DIR" != "$CFG_BUILD_DIR" ]; then err "cargo does not currently support an out-of-tree build dir" fi +if [ ! -z "$CFG_ENABLE_NIGHTLY" ]; then + if [ ! -f .cargo/config ]; then + mkdir -p .cargo + cat > .cargo/config <<-EOF +[target.x86_64-unknown-linux-gnu.openssl] +rustc-flags = "-l ssl:static -l crypto:static -l dl -L /home/rustbuild/root64/lib" +root = "/home/rustbuild/root64" +include = "/home/rustbuild/root64/include" + +[target.i686-unknown-linux-gnu.openssl] +rustc-flags = "-l ssl:static -l crypto:static -l dl -L /home/rustbuild/root32/lib" +root = "/home/rustbuild/root32" +include = "/home/rustbuild/root32/include" +EOF + fi +fi + step_msg "writing configuration" putvar CFG_SRC_DIR diff --git a/src/etc/dl-snapshot.py b/src/etc/dl-snapshot.py index a09ce2375..64329ac9c 100644 --- a/src/etc/dl-snapshot.py +++ b/src/etc/dl-snapshot.py @@ -27,10 +27,8 @@ elif triple == 'i686-apple-darwin': elif triple == 'x86_64-apple-darwin': me = mac64 elif triple == 'i686-pc-windows-gnu': - triple = 'i686-w64-mingw32' me = win32 elif triple == 'x86_64-pc-windows-gnu': - triple = 'x86_64-w64-mingw32' me = win64 else: raise Exception("no snapshot for the triple: " + triple) diff --git a/src/etc/print-new-snapshot.py b/src/etc/print-new-snapshot.py index 70da2db3f..8c7d0e898 100644 --- a/src/etc/print-new-snapshot.py +++ b/src/etc/print-new-snapshot.py @@ -16,8 +16,8 @@ snaps = { 'macos-x86_64': 'x86_64-apple-darwin', 'linux-i386': 'i686-unknown-linux-gnu', 'linux-x86_64': 'x86_64-unknown-linux-gnu', - 'winnt-i386': 'i686-w64-mingw32', - 'winnt-x86_64': 'x86_64-w64-mingw32', + 'winnt-i386': 'i686-pc-windows-gnu', + 'winnt-x86_64': 'x86_64-pc-windows-gnu', } for platform in sorted(snaps): diff --git a/src/registry/Cargo.toml b/src/registry/Cargo.toml index 695caa0f2..3a7755ecd 100644 --- a/src/registry/Cargo.toml +++ b/src/registry/Cargo.toml @@ -9,4 +9,4 @@ path = "lib.rs" [dependencies.curl] git = "https://github.com/alexcrichton/curl-rust" -branch = "bundle" +branch = "build-cmd" diff --git a/src/snapshots.txt b/src/snapshots.txt index 1d56ad856..304f5c306 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,19 @@ +2014-11-11 + linux-i386 5cbf3346309d303cb954c363097fc4abedf50610 + linux-x86_64 8c1594e227eca6f23ba02daa5f3cd6150ac88907 + macos-i386 f338835a58cc5357ed092a23ba0ddbf2624dfacd + macos-x86_64 b2d03a6a9422c42b7f5ba008c8851ddc89ae693c + winnt-i386 50b851d94181375f0c7a00aacb7d8d63960eddc7 + winnt-x86_64 aa12a1cb80a665f53066a15774360d686b3e5968 + +2014-11-07 + linux-i386 f65ae2b9d94477fec79e444ea489ff98a456e033 + linux-x86_64 1a7f663d8f4e2109240a20d8e63c958e0557d883 + macos-i386 9d82a00bd396c99cc27693864da2364d0394e843 + macos-x86_64 1dc297d8e149384a76dfb7efc7869b82fe663b92 + winnt-i386 d9f87d83c6cbabd7a4794498e4c3a4e94df0740a + winnt-x86_64 74284401082e1b5aff14a72e2152ed5cb55812cf + 2014-10-28 linux-i386 15fb3dd24140911ba707d8b4b1dd6826732a3ad6 linux-x86_64 a924d82f5dc987efda6303d3e2c1aeb8ade34faa diff --git a/tests/test_cargo_compile_custom_build.rs b/tests/test_cargo_compile_custom_build.rs index cd441d049..2aceee87a 100644 --- a/tests/test_cargo_compile_custom_build.rs +++ b/tests/test_cargo_compile_custom_build.rs @@ -288,13 +288,13 @@ test!(overrides_and_links { assert_that(p.cargo_process("build").arg("-v"), execs().with_status(0) .with_stdout(format!("\ -{compiling} foo v0.5.0 (file://[..]) -{running} `rustc build.rs [..]` -{compiling} a v0.5.0 (file://[..]) -{running} `rustc [..] --crate-name a [..]` -{running} `[..]build-script-build[..]` +[..] +[..] +[..] +[..] +[..] {running} `rustc [..] --crate-name foo [..] -L foo -L bar[..]` -", compiling = COMPILING, running = RUNNING).as_slice())); +", running = RUNNING).as_slice())); }) test!(unused_overrides { -- 2.30.2